package com.kakame.codenews.front.message.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.kakame.codenews.base.web.entity.Page;
import com.kakame.codenews.base.web.fast.mapping.nexus.ArticleComment;
import com.kakame.codenews.base.web.fast.mapping.nexus.UserMessage;
import com.kakame.codenews.front.message.dao.FrontMessageDao;
import com.kakame.codenews.front.message.service.FrontMessageService;

@Service
public class FrontMessageServiceImpl implements FrontMessageService {

    @Resource
    private FrontMessageDao messageDao;
    
    @Override
    public Integer countNoReadMessage(String userId) {
        return messageDao.countNoReadMessage(userId);
    }

    @Override
    public void insertNoReadMessage(List<UserMessage> userMessages) {
        messageDao.insertNoReadMessage(userMessages);
    }

    @Override
    public Page<ArticleComment> messageGrid(Map<String, Object> queryMap) {
        return messageDao.messageGrid(queryMap);
    }

}
